<script type="text/html" template
        lay-url="{{ window.globalConfig.url_videos + '/' + layui.router().search.id }}"
        lay-done="layui.data.done(d);">
    <title>详情</title>

    <div class="layui-fluid">
        <div class="layui-row layui-col-space15">
            <div class="layui-col-md12">
                <div class="layui-card">
                    <div class="layui-card-header">
                        <a href="javascript:history.back()"
                           class="layui-btn layui-btn-primary layui-btn-sm" id="goBack">返回上级</a>
                    </div>
                    <div class="layui-card-body">
                        <div class="layui-form" lay-filter="LAY-home-videos-listform"
                             id="LAY-home-videos-listform"
                             style="padding: 20px 30px 0 0;">

                            <div class="layui-tab layui-tab-brief">
                                <ul class="layui-tab-title">
                                    <li class="layui-this">基础信息</li>
                                </ul>
                                <div class="layui-tab-content">
                                    <!-- 基础信息 -->
                                    <div class="layui-tab-item layui-show">
                                        <div class="layui-form-item">
                                            <label class="layui-form-label">名称</label>
                                            <div class="layui-input-inline">
                                                <input type="text" name="name" value="{{ d.data.name || '' }}"
                                                       lay-verify="required"
                                                       placeholder="请输入名称" autocomplete="off" class="layui-input"
                                                >
                                            </div>
                                        </div>
                                        <div class="layui-form-item">
                                            <label class="layui-form-label">视频链接</label>
                                            <div class="layui-input-block">
                                                <input type="text" name="link" value="{{ d.data.link || '' }}"
                                                       placeholder="请输入视频链接" autocomplete="off"
                                                       class="layui-input"
                                                >
                                            </div>
                                        </div>

                                        <div class="layui-form-item">
                                            <label class="layui-form-label">视频封面</label>
                                            <div class="layui-input-block">
                                                <div class="layui-upload-list" id="ID-upload-videos-btn">

                                                    <img
                                                            {{# if(d.data.photo){ }}
                                                            src="{{ window.globalConfig.img_bind_url + d.data.photo}}"
                                                            {{# } else { }}
                                                            src="./res/style/imgs/upload.png"
                                                            {{# } }}

                                                            id="ID-upload-videos-img" style="max-width: 200px"
                                                            class="layui-upload-img">
                                                </div>
                                                <input type="text" class="layui-input" name="photo" id="photo"
                                                       value="{{ d.data.photo }}" placeholder="请输入图片地址">
                                            </div>
                                        </div>
                                        <div class="layui-form-item">
                                            <label class="layui-form-label">是否显示</label>
                                            <div class="layui-input-inline">
                                                <input type="checkbox" name="is_show" title="开启|关闭" value="1"
                                                       lay-skin="switch"
                                                       {{# if(!d.data.is_show){d.data.is_show=1} }}
                                                       {{# if(d.data.is_show){ }}
                                                       checked
                                                       {{# } }}
                                                >
                                            </div>
                                        </div>


                                        <div class="layui-form-item">
                                            <label class="layui-form-label">排序</label>
                                            <div class="layui-input-inline">
                                                <input type="number" name="order_id" lay-affix="number" min="0"
                                                       value="{{ d.data.order_id | 1 }}"
                                                       placeholder="请输入排序"
                                                       autocomplete="off"
                                                       class="layui-input">
                                            </div>
                                        </div>
                                        <!--  描述  -->
                                        <div class="layui-tab-item">
                                            <div class="layui-form-item">
                                                <label class="layui-form-label">描述</label>
                                                <div class="layui-input-inline" style="width: 100%">
                                                    <textarea name="desc" style="width: 400px; height: 150px;"
                                                              autocomplete="off"
                                                              class="layui-textarea">{{ d.data.desc }}</textarea>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>


                            <!--        <input type="hidden" name="content" id="editor-content" value="{{ d.params.content }}">-->
                            <input type="hidden" name="id" value="{{ d.data.id }}">
                            <div class="layui-form-item">
                                <label class="layui-form-label"></label>
                                <div class="layui-input-inline">
                                    <input type="button" lay-submit
                                           lay-filter="LAY-home-videos-listform-submit"
                                           value="保存"
                                           class="layui-btn">
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</script>
<script src="res/modules/videos.js"></script>
